package com.xpc.rpc.register.common;

import com.xpc.rpc.protocol.meta.ServiceMeta;
import com.xpc.rpc.register.common.config.RegisterConfig;

public interface RegisterService {

      /**
       * 服务注册
       * @param serviceMeta 服务注册元数据
       */
      void register(ServiceMeta serviceMeta) throws Exception;

      /**
       * 服务发现
       * @param serviceName
       * @loadbalancerType: 负载均衡策略类型
       * @return
       * @throws Exception
       */
      ServiceMeta discovery(String serviceName,String loadbalancerType) throws Exception;

      /**
       * 初始化方法
       */
      void init(RegisterConfig registerConfig);
}
